package com.design.yjx.command.common;

/**
 * @author yuanjianxin
 * @date 2017/8/21 14:51
 */
public class LightOffCommand implements Command {
    private Light light;

    public LightOffCommand(Light light) {
        this.light = light;
    }

    @Override
    public void execute() {
        light.off();
    }

    @Override
    public void undo() {
        light.on();
    }
}
